
function [p q] = time_discretizers(dt,option)
% Following Algorithms are implemented in the current study
% 1. Implicit Theta Scheme (Implicit for two variables)!!
% 2. Implicit BDF Two parameter Scheme (Implicit for two variables)
% 3. Explicit Leap Frog Scheme
% 4. Semi Implicit Trapezoidal
% 5. Chorin' Projection - Works
global U  h  g  p  q r  nt dx h1 x p_global tmax L steps itermax;


pi1=1;
qi=1;

for i=1:x
    p(i,1) = pi1*cos(4*pi*(i-1)*dx/L);  
    q(i,1) = qi;
    r(i,1)=0;
end

p_global = zeros(x,tmax/5);

nt = round(tmax/dt);   % number of time steps
t = 0:dt:tmax;  % time vector, 

xplot=1:x;
h1 = plot(xplot,p,'yDataSource','p');
p_global(:,1) = p;

if (option ==1)
    disp('1. Fully Implicit Theta Scheme\n');
%    beta = input('Enter the value of theta: \n');
    [p q] = implicit(dt);   
    
elseif (option==2)
     disp('2. Fully Implicit BDF Two parameter Scheme \n'); 
    [p q] = BDF2(dt);         
    
elseif (option ==3) 
    disp('3. Explicit Leap Frog \n');
    [p q] = leapfrog(dt);        

    elseif (option ==4)
         display(' Semi Implicit Scheme Trapezoidal with upwinding Discretization ');
    [p q] = SemiImplicit_Trapezoidal(dt);    
    
    elseif (option ==5)
   display(' Implicit Scheme  Chorins Projection');
    [p q] = Chorin_Projection(dt);    
    
end




